-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/post content #27
base: main
Are you sure you want to change the base?
Conversation
emmanuelCode
commented
Jan 11, 2024
•
edited
Loading
edited
- added Image picker to take picture from camera and select picture from the gallery
- fixed issues with running emulator on a android device
- update all dependencies
- setup firebase cloud storage
- upload image to storage reference (prototype)
- update instruction in readme
- add translation in arb files
- add unit test
- add widget test
4. Connect your Android device with Firebase Emulator Servers: | ||
|
||
Firestore | ||
```bash | ||
adb reverse tcp:8080 tcp:8080 | ||
``` | ||
Storage | ||
```bash | ||
adb reverse tcp:9199 tcp:9199 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally it should be required since it is supposed to be automatic.
README.md
Outdated
|
||
### How to initialize Firebase | ||
### How to initialize Firebase Production |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it's instruction for production. It's just a general instruction.
README.md
Outdated
7. Disable the firebase emulator dev environment | ||
|
||
**disable the following lines of codes in `lib/main.dart` or build in production mode** | ||
```dart | ||
if (kDebugMode) { | ||
try { | ||
const host = '0.0.0.0'; | ||
FirebaseStorage.instance.useStorageEmulator(host, 9199); | ||
FirebaseFirestore.instance.useFirestoreEmulator(host, 8080); | ||
} catch (e) { | ||
// ignore: avoid_print | ||
print(e); | ||
} | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't required since there's the kDebugMode
, it's not mandatory change. It's only required when the dev wants to test their debug build against to firebase server rather than the emulator.
README.md
Outdated
|
||
## Support | ||
|
||
If you have trouble running this project. Go to our [discord group](https://discord.gg/NMc62wG7eU) and ask your questions under #stackoverflow channel. We'll be happy to lend you a hand. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'd better encourage users to create a ticket in GitHub rather than Discord. (That doesn't mean they can't tho..)
firebase.json
Outdated
@@ -1,15 +1,23 @@ | |||
{ | |||
"emulators": { | |||
"firestore": { | |||
"port": 8080 | |||
"port": 8080, | |||
"host": "0.0.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to do this.
firebase.json
Outdated
"singleProjectMode": true, | ||
"storage": { | ||
"port": 9199, | ||
"host": "0.0.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to do this.
lib/main.dart
Outdated
const host = '0.0.0.0'; | ||
FirebaseStorage.instance.useStorageEmulator(host, 9199); | ||
FirebaseFirestore.instance.useFirestoreEmulator(host, 8080); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this change.
import 'package:image_picker/image_picker.dart'; | ||
import 'package:instreal/features/posts/post_entity.dart'; | ||
|
||
import '../../../l10n/index.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind using absolute path?